import request from "@/utils/request"

// 字典类别分页查询
export function fetchList(query) {
  return request({
    url: "/basic/hisDicType/page",
    method: "get",
    params: query
  })
}
// 根据id返回树形菜单下级集合
export function GetLazyNodeDicType(id) {
  return request({
    url: "/basic/hisDicType/lazyNodeTree/" + id,
    method: "get"
  })
}
// 点击确定新增
export function addObj(obj) {
  return request({
    url: "/basic/hisDicType",
    method: "post",
    data: obj
  })
}

// 点击删除
export function delObj(id) {
  return request({
    url: "/basic/hisDicType/" + id,
    method: "delete"
  })
}

// 获取所有下级树集合
export function fetchDicTypeTree(query) {
  return request({
    url: "/basic/hisDicType/tree",
    method: "get",
    params: query
  })
}
// 通过主键ID查询类别字典数据详细信息
export function getObj(id) {
  return request({
    url: "/basic/hisDicType/" + id,
    method: "get"
  })
}

// 点击修改
export function putObj(obj) {
  return request({
    url: "/basic/hisDicType",
    method: "put",
    data: obj
  })
}

// 请求 字典类别项目大类集合
export function getBasicDicTypeList() {
  return request({
    url: "/basic/hisDicType/getBasicDicTypeList",
    method: "get"
  })
}
